Integrand size = 18, antiderivative size = 150 \[ \int \frac {x^2}{a+b x^2+c x^4} \, dx=-\frac {\sqrt {b-\sqrt {b^2-4 a c}} \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}}+\frac {\sqrt {b+\sqrt {b^2-4 a c}} \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \]
-1/2*arctan(x*2^(1/2)*c^(1/2)/(b-(-4*a*c+b^2)^(1/2))^(1/2))*(b-(-4*a*c+b^2 )^(1/2))^(1/2)*2^(1/2)/c^(1/2)/(-4*a*c+b^2)^(1/2)+1/2*arctan(x*2^(1/2)*c^( 1/2)/(b+(-4*a*c+b^2)^(1/2))^(1/2))*(b+(-4*a*c+b^2)^(1/2))^(1/2)*2^(1/2)/c^ (1/2)/(-4*a*c+b^2)^(1/2)
Time = 0.06 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.10 \[ \int \frac {x^2}{a+b x^2+c x^4} \, dx=\frac {\left (-b+\sqrt {b^2-4 a c}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\sqrt {b+\sqrt {b^2-4 a c}} \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b+\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b^2-4 a c}} \]
((-b + Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4 *a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + (Sqrt[b + Sqrt[b^2 - 4*a*c]]*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b^2 - 4*a*c])
Time = 0.26 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.05, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1450, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x^2}{a+b x^2+c x^4} \, dx\) |
\(\Big \downarrow \) 1450 |
\(\displaystyle \frac {1}{2} \left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{c x^2+\frac {1}{2} \left (b-\sqrt {b^2-4 a c}\right )}dx+\frac {1}{2} \left (\frac {b}{\sqrt {b^2-4 a c}}+1\right ) \int \frac {1}{c x^2+\frac {1}{2} \left (b+\sqrt {b^2-4 a c}\right )}dx\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\left (1-\frac {b}{\sqrt {b^2-4 a c}}\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {b-\sqrt {b^2-4 a c}}}\right )}{\sqrt {2} \sqrt {c} \sqrt {b-\sqrt {b^2-4 a c}}}+\frac {\left (\frac {b}{\sqrt {b^2-4 a c}}+1\right ) \arctan \left (\frac {\sqrt {2} \sqrt {c} x}{\sqrt {\sqrt {b^2-4 a c}+b}}\right )}{\sqrt {2} \sqrt {c} \sqrt {\sqrt {b^2-4 a c}+b}}\) |
((1 - b/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*Sqrt[c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) + ((1 + b/Sqrt[b^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[ 2]*Sqrt[c]*Sqrt[b + Sqrt[b^2 - 4*a*c]])
3.9.57.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((d_.)*(x_))^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> Wi th[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(d^2/2)*(b/q + 1) Int[(d*x)^(m - 2)/(b/ 2 + q/2 + c*x^2), x], x] - Simp[(d^2/2)*(b/q - 1) Int[(d*x)^(m - 2)/(b/2 - q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 2]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.05 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.27
method | result | size |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (c \,\textit {\_Z}^{4}+\textit {\_Z}^{2} b +a \right )}{\sum }\frac {\textit {\_R}^{2} \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{3} c +\textit {\_R} b}\right )}{2}\) | \(41\) |
default | \(4 c \left (\frac {\left (b +\sqrt {-4 a c +b^{2}}\right ) \sqrt {2}\, \arctan \left (\frac {c x \sqrt {2}}{\sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{8 c \sqrt {-4 a c +b^{2}}\, \sqrt {\left (b +\sqrt {-4 a c +b^{2}}\right ) c}}-\frac {\left (-b +\sqrt {-4 a c +b^{2}}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {c x \sqrt {2}}{\sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )}{8 c \sqrt {-4 a c +b^{2}}\, \sqrt {\left (-b +\sqrt {-4 a c +b^{2}}\right ) c}}\right )\) | \(149\) |
Leaf count of result is larger than twice the leaf count of optimal. 559 vs. \(2 (115) = 230\).
Time = 0.26 (sec) , antiderivative size = 559, normalized size of antiderivative = 3.73 \[ \int \frac {x^2}{a+b x^2+c x^4} \, dx=\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {-\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (-\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {-\frac {b + \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {-\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}} \log \left (-\frac {\sqrt {\frac {1}{2}} {\left (b^{2} c - 4 \, a c^{2}\right )} \sqrt {-\frac {b - \frac {b^{2} c - 4 \, a c^{2}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}}}{b^{2} c - 4 \, a c^{2}}}}{\sqrt {b^{2} c^{2} - 4 \, a c^{3}}} + x\right ) \]
1/2*sqrt(1/2)*sqrt(-(b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))*log(sqrt(1/2)*(b^2*c - 4*a*c^2)*sqrt(-(b + (b^2*c - 4*a*c^2)/ sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x) - 1/2*sqrt(1/2)*sqrt(-(b + (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2* c - 4*a*c^2))*log(-sqrt(1/2)*(b^2*c - 4*a*c^2)*sqrt(-(b + (b^2*c - 4*a*c^2 )/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x) - 1/2*sqrt(1/2)*sqrt(-(b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^ 2*c - 4*a*c^2))*log(sqrt(1/2)*(b^2*c - 4*a*c^2)*sqrt(-(b - (b^2*c - 4*a*c^ 2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x ) + 1/2*sqrt(1/2)*sqrt(-(b - (b^2*c - 4*a*c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b ^2*c - 4*a*c^2))*log(-sqrt(1/2)*(b^2*c - 4*a*c^2)*sqrt(-(b - (b^2*c - 4*a* c^2)/sqrt(b^2*c^2 - 4*a*c^3))/(b^2*c - 4*a*c^2))/sqrt(b^2*c^2 - 4*a*c^3) + x)
Time = 0.37 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.50 \[ \int \frac {x^2}{a+b x^2+c x^4} \, dx=\operatorname {RootSum} {\left (t^{4} \cdot \left (256 a^{2} c^{3} - 128 a b^{2} c^{2} + 16 b^{4} c\right ) + t^{2} \left (- 16 a b c + 4 b^{3}\right ) + a, \left ( t \mapsto t \log {\left (64 t^{3} a c^{2} - 16 t^{3} b^{2} c - 2 t b + x \right )} \right )\right )} \]
RootSum(_t**4*(256*a**2*c**3 - 128*a*b**2*c**2 + 16*b**4*c) + _t**2*(-16*a *b*c + 4*b**3) + a, Lambda(_t, _t*log(64*_t**3*a*c**2 - 16*_t**3*b**2*c - 2*_t*b + x)))
\[ \int \frac {x^2}{a+b x^2+c x^4} \, dx=\int { \frac {x^{2}}{c x^{4} + b x^{2} + a} \,d x } \]
Leaf count of result is larger than twice the leaf count of optimal. 503 vs. \(2 (115) = 230\).
Time = 1.36 (sec) , antiderivative size = 503, normalized size of antiderivative = 3.35 \[ \int \frac {x^2}{a+b x^2+c x^4} \, dx=-\frac {{\left (2 \, b^{2} c^{2} - 8 \, a c^{3} - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c + \sqrt {b^{2} - 4 \, a c} c} b^{2} + 4 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c + \sqrt {b^{2} - 4 \, a c} c} a c + 2 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c + \sqrt {b^{2} - 4 \, a c} c} b c - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c + \sqrt {b^{2} - 4 \, a c} c} c^{2} - 2 \, {\left (b^{2} - 4 \, a c\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {\frac {b + \sqrt {b^{2} - 4 \, a c}}{c}}}\right )}{2 \, {\left (b^{4} - 8 \, a b^{2} c - 2 \, b^{3} c + 16 \, a^{2} c^{2} + 8 \, a b c^{2} + b^{2} c^{2} - 4 \, a c^{3}\right )} {\left | c \right |}} + \frac {{\left (2 \, b^{2} c^{2} - 8 \, a c^{3} - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c - \sqrt {b^{2} - 4 \, a c} c} b^{2} + 4 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c - \sqrt {b^{2} - 4 \, a c} c} a c + 2 \, \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c - \sqrt {b^{2} - 4 \, a c} c} b c - \sqrt {2} \sqrt {b^{2} - 4 \, a c} \sqrt {b c - \sqrt {b^{2} - 4 \, a c} c} c^{2} - 2 \, {\left (b^{2} - 4 \, a c\right )} c^{2}\right )} \arctan \left (\frac {2 \, \sqrt {\frac {1}{2}} x}{\sqrt {\frac {b - \sqrt {b^{2} - 4 \, a c}}{c}}}\right )}{2 \, {\left (b^{4} - 8 \, a b^{2} c - 2 \, b^{3} c + 16 \, a^{2} c^{2} + 8 \, a b c^{2} + b^{2} c^{2} - 4 \, a c^{3}\right )} {\left | c \right |}} \]
-1/2*(2*b^2*c^2 - 8*a*c^3 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*b^2 + 4*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c) *c)*a*c + 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*b*c - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c + sqrt(b^2 - 4*a*c)*c)*c^2 - 2*(b^2 - 4*a*c)*c^2)*arctan(2*sqrt(1/2)*x/sqrt((b + sqrt(b^2 - 4*a*c))/c))/((b^4 - 8*a*b^2*c - 2*b^3*c + 16*a^2*c^2 + 8*a*b*c^2 + b^2*c^2 - 4*a*c^3)*abs(c)) + 1/2*(2*b^2*c^2 - 8*a*c^3 - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c - sqrt(b^ 2 - 4*a*c)*c)*b^2 + 4*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c - sqrt(b^2 - 4*a* c)*c)*a*c + 2*sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c - sqrt(b^2 - 4*a*c)*c)*b* c - sqrt(2)*sqrt(b^2 - 4*a*c)*sqrt(b*c - sqrt(b^2 - 4*a*c)*c)*c^2 - 2*(b^2 - 4*a*c)*c^2)*arctan(2*sqrt(1/2)*x/sqrt((b - sqrt(b^2 - 4*a*c))/c))/((b^4 - 8*a*b^2*c - 2*b^3*c + 16*a^2*c^2 + 8*a*b*c^2 + b^2*c^2 - 4*a*c^3)*abs(c ))
Time = 13.28 (sec) , antiderivative size = 416, normalized size of antiderivative = 2.77 \[ \int \frac {x^2}{a+b x^2+c x^4} \, dx=-2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,b^2\,c\right )+\frac {x\,\left (8\,b^3\,c^2-32\,a\,b\,c^3\right )\,\left (b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c\right )}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}\right )\,\sqrt {-\frac {b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}}{a\,c}\right )\,\sqrt {-\frac {b^3+\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}-2\,\mathrm {atanh}\left (\frac {\left (x\,\left (4\,a\,c^2-2\,b^2\,c\right )-\frac {x\,\left (8\,b^3\,c^2-32\,a\,b\,c^3\right )\,\left (\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c\right )}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}\right )\,\sqrt {\frac {\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}}}{a\,c}\right )\,\sqrt {\frac {\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-b^3+4\,a\,b\,c}{8\,\left (16\,a^2\,c^3-8\,a\,b^2\,c^2+b^4\,c\right )}} \]
- 2*atanh(((x*(4*a*c^2 - 2*b^2*c) + (x*(8*b^3*c^2 - 32*a*b*c^3)*(b^3 + (-( 4*a*c - b^2)^3)^(1/2) - 4*a*b*c))/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))* (-(b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a* b^2*c^2)))^(1/2))/(a*c))*(-(b^3 + (-(4*a*c - b^2)^3)^(1/2) - 4*a*b*c)/(8*( b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))^(1/2) - 2*atanh(((x*(4*a*c^2 - 2*b^2*c ) - (x*(8*b^3*c^2 - 32*a*b*c^3)*((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*c) )/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))*(((-(4*a*c - b^2)^3)^(1/2) - b^3 + 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)))^(1/2))/(a*c))*(((-(4*a *c - b^2)^3)^(1/2) - b^3 + 4*a*b*c)/(8*(b^4*c + 16*a^2*c^3 - 8*a*b^2*c^2)) )^(1/2)